home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // TicTac.h
- //
- //***********************************************************************
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CMainWindow : public CWnd
- {
- private:
- static const CRect m_rcSquares[9];
- int m_nGameGrid[9];
- int m_nNextChar;
-
- int GetRectID (CPoint);
- void DrawBoard (CDC*);
- void DrawX (CDC*, int);
- void DrawO (CDC*, int);
- void ResetGame ();
- void CheckForGameOver ();
- int IsWinner ();
- BOOL IsDraw ();
-
- public:
- CMainWindow ();
-
- protected:
- virtual void PostNcDestroy ();
-
- afx_msg void OnPaint ();
- afx_msg void OnLButtonDown (UINT, CPoint);
- afx_msg void OnLButtonDblClk (UINT, CPoint);
- afx_msg void OnRButtonDown (UINT, CPoint);
-
- DECLARE_MESSAGE_MAP ()
- };
-